From: Benjamin Barenblat Date: Tue, 9 Feb 2021 19:41:06 +0000 (+0000) Subject: Use libatomic if necessary X-Git-Tag: archive/raspbian/0_20210324.2-3+rpi1~1^2^2~5 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success/%22http:/www.example.com/cgi/success?a=commitdiff_plain;h=f5a08880d80d31a9c93c990206602b05b797e500;p=abseil.git Use libatomic if necessary Bug-Debian: https://bugs.debian.org/973492 On some architectures, notably armel, Abseil needs symbols defined in libatomic. Abseil does not currently have a well-developed system to declare external library dependencies, so just have the linker determine if anything needs libatomic and add the DT_NEEDED entry where necessary. Gbp-Pq: Name latomic.diff --- diff --git a/absl/copts/AbseilConfigureCopts.cmake b/absl/copts/AbseilConfigureCopts.cmake index acd46d0..92dd601 100644 --- a/absl/copts/AbseilConfigureCopts.cmake +++ b/absl/copts/AbseilConfigureCopts.cmake @@ -64,4 +64,8 @@ else() set(ABSL_TEST_COPTS "") endif() +list(APPEND ABSL_DEFAULT_LINKOPTS + "-Wl,--as-needed" "-latomic" "-Wl,--no-as-needed" +) + set(ABSL_CXX_STANDARD "${CMAKE_CXX_STANDARD}")